<!--  -->
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="23" :offset="0">
        <el-card shadow="always" :body-style="{ padding: '20px' }">
          <div slot="header">
            <span>订单总数统计</span>
          </div>
          <div class="card-con">
            <div class="card-left">
              <div class="left-count">
                <div class="c-title">
                  <span>本月订单总数</span>
                </div>
                <div class="c-count">10000</div>
                <div class="compare">
                  <span v-if="true" style="color:#00A950">
                    <i class="el-icon-caret-top"></i>
                    {{compare}}
                  </span>
                  <span v-else style="color:#F04844">
                    <i class="el-icon-caret-bottom"></i>
                    {{compare}}
                  </span>
                  <span style="color: #aaa;">同比上月</span>
                </div>
              </div>
              <div class="left-count">
                <div class="c-title">
                  <span>本周订单总数</span>
                </div>
                <div class="c-count">10000</div>
                <div class="compare">
                  <span v-if="false" style="color:#00A950">
                    <i class="el-icon-caret-top"></i>
                    {{compare}}
                  </span>
                  <span v-else style="color:#F04844">
                    <i class="el-icon-caret-bottom"></i>
                    {{compare}}
                  </span>
                  <span style="color: #aaa;">同比上周</span>
                </div>
              </div>
            </div>
            <div class="card-right">
              <div style="margin:20px">
                <div>近一周订单统计</div>
              </div>
              <line-chart :chartData="lineData" />
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="15" :offset="0">
        <el-card shadow="always" :body-style="{ padding: '20px' }">
          <div slot="header">
            <span>销售额统计</span>
          </div>
          <my-bar />
        </el-card>
      </el-col>
      <el-col :span="8" :offset="0">
        <el-card shadow="always" :body-style="{ padding: '20px' }">
          <div slot="header">
            <span>订单类型统计</span>
          </div>
          <my-pie />
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import lineChart from "@/components/dashboard/areaChart.vue";
import myBar from "@/components/dashboard/myBarChart.vue";
import myPie from "@/components/dashboard/myPieChart.vue";

export default {
  name: "",
  data() {
    return {
      compare: "10%",
      lineData: {}
    };
  },
  components: {
    lineChart,
    myBar,
    myPie
  },
  mounted() {},
  beforeDestroy() {}
};
</script>
<style scoped>
.card-left {
  width: 140px;
}
.card-con {
  display: flex;
  justify-content: flex-start;
}
.left-count {
  font-size: 12px;
  margin: 10px 0 30px;
  font-weight: 450;
}
.left-count .c-title {
  color: #989898;
  font-size: 12px;
}
.left-count .c-count {
  font-size: 28px;
  color: #666666;
}

.card-right {
  border-left: 1px solid #ddd;
  flex-grow: 1;
}
.el-row {
  margin-block: 20px;
}
</style>